<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}
        <hr />
        <father :app='msg'></father>
    </div>
    <script type='text/javascript'>
        var son1 = {
            props:['fa'],
            template: `<div class='son'>
                我是son组件==={{fa}}
            </div>`,
            data() {
                return {
                    s1: 'son1'
                }
            }
        }
        var father = {
            props:['app'],
            template: `<div class='father'>
                我是father组件===={{app}}
                <hr/>
                <son :fa='f1'></son>
            </div>`,
            data() {
                return {
                    f1: 'father1'
                }
            },
            components: {
                son:son1
            }
        }




        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue  app'
            },
            components: {
                father
            }
        });
    </script>
</body>

</html>